package learner.hmm;

import java.io.Serializable;

import learner.ObservationPoint;

public class MovementVector extends ObservationPoint implements Serializable{

	public MovementVector(int xDiff, int yDiff, long tDiff){
		setX(xDiff);
		setY(yDiff);
		setT(tDiff);
	}
	
	@Override
	public String toString() {
		return "(x: " + getX() + ", y: " + getY() + ")";
	}
	
	public boolean isStationary(){
		return (this.getX()==0 && this.getY()==0);
	}
	
	public double getLength(){
		return (Math.sqrt(getX()*getX()+getY()*getY()));
	}
	
	public boolean isSkip(){
		return getLength()>1.99;
	}
}
